<template>
  <div class="people-serve">
    <div class="list-header clearfix">
      <div class="list-header-tit fl">便民服务</div>
      <div class="list-close fr">
        <i @click="backHome" class="list-close el-icon-circle-close"></i>
      </div>
    </div>
    <div class="mt20">
      <iframe :src="iframeSrc" width="375" height="667" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" style=""></iframe>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      path:[
       { type:'0',name:"交通违章",path:"infraction"},
       { type:'1',name:"火车票机票",path:"trainTimetable"},
       { type:'2',name:"医疗健康",path:"nationalMedical"},
       { type:'3',name:"税务服务",path:"personalTax"},
      ],
      iframeSrc:'',
    }
  },
  mounted(){
    this.initPath();
  },
  methods:{
    initPath(){
      let type = this.$route.query.type;
      let path = this.path.filter(item=>item.type == type)[0].path || ''
      let src = 'https://ucapapp.kaipuyun.cn/servicePage?serviceName='+path+'&cityID=650000&clientID=547da9a56261d11f9807ff01bd4d97e8&localFrom=a2d999a41bef7a0d91d4d12f712bc017_app'
      this.iframeSrc = src;
    },
    backHome(){
      this.$router.push({ name:'home' });
    },
  },
};
</script>

<style lang="scss" scoped>
.people-serve {
  height: 1010px;
  background-color: #ffffff;
  border-radius: 10px;
  padding: 15px;
}
</style>